import request from "../utils/request";

//获取会议室列表
export function getMeetingList(params) {
  return request({
    method: "get",
    url: "/api/meetingroom/GetPage",
    params
  });
}

//新增会议室
export function addMeeting(data) {
  return request({
    method: "post",
    url: "/api/meetingroom/Add",
    data
  });
}

//修改会议室
export function updateMeeting(data) {
  return request({
    method: "put",
    url: "/api/meetingroom/Update",
    data
  });
}

//根据id获取会议室详情
export function getMeetingInfo(params) {
  return request({
    method: "get",
    url: "/api/meetingroom/Get",
    params
  });
}

//会议室状态开关
export function setMeetingState(data) {
  return request({
    method: "put",
    url: "/api/meetingroom/UpdateState",
    data
  });
}

//会议室记录列表
export function meetingRecordList(data) {
  return request({
    method: "post",
    url: "/api/meetingrecord/PageListAsync",
    data
  });
}

//会议室记录搜索会议室列表
export function getMeetingListparm(params) {
  return request({
    method: "get",
    url: "/api/meetingroom/List",
    params
  });
}

//取消客户会议记录
export function delMeetingRecord(params) {
  return request({
    method: "delete",
    url: `/api/meetingrecord/DeleteAsync?id=${params.id}`,
  });
}